#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int n,result,count=0;
	int arr[10] = { 0 };
	scanf("%d", &n);
	for (int i = 0;i < n;i++)
	{
		scanf("%d", &arr[i]);
	}
	for (int i = 0;i < n - 1;i++)
	{
		result = arr[i + 1] - arr[i];
		count++;
		printf("%d", result);
		if ((i + 1) % 3 == 0)
		{
			printf("\n");
		}
		else
		{
			printf(" ");
		}
	}
	return 0;
}